//
//  TableViewCellDisplayInfo.m
//  OTOClient
//
//  Created by Suny on 15/3/29.
//  Copyright (c) 2015年 Suny. All rights reserved.
//

#import "TableViewCellDisplayInfo.h"

@interface TableViewCellDisplayInfo ()

@end

@implementation TableViewCellDisplayInfo

- (void)dealloc
{
    self.modelInfo = nil;
}

- (instancetype)initWithModelInfo:(NSObject *)modelInfo
{
    self = [super init];
    if (self)
    {
        self.modelInfo = modelInfo;
    }

    return self;
}

+ (instancetype)infoWithModelInfo:(NSObject *)modelInfo
{
    return [[self alloc] initWithModelInfo:modelInfo];
}

- (CGFloat)heightForCell
{
    return 44;
}



- (NSString *)cellContentClass
{
	if (!_cellContentClass)
	{

		NSString *displayInfoClassName = NSStringFromClass([self class]);
		NSString *cellContentViewName = [displayInfoClassName stringByReplacingOccurrencesOfString:@"DisplayInfo"
																						withString:@"ContentView"];
		
		
		if (NSClassFromString(cellContentViewName))
		{
			_cellContentClass = cellContentViewName;
		}
		else 
		{
			_cellContentClass = @"TableViewCellContentView";
		}
	}
	
	return _cellContentClass;
}



@end
